#include "SummaryForm.h"
#include "ui_SummaryForm.h"

SummaryForm::SummaryForm(MyModel *_m, QWidget *parent) :
	QDialog(parent),
	m_ui(new Ui::SummaryForm),
	model(_m)
{
	m_ui->setupUi(this);
	QTableWidget *t = m_ui->summaryTable;
	t->verticalHeader()->hide();
	t->setSelectionBehavior(QAbstractItemView::SelectRows);
	t->resizeColumnsToContents();
	t->horizontalHeader()->setStretchLastSection(true);
	t->setRowCount(1);
	t->setColumnCount(1);
	t->setItem(0,0,new QTableWidgetItem("let us look at it"));
}

SummaryForm::~SummaryForm()
{
	delete m_ui;
}

void SummaryForm::changeEvent(QEvent *e)
{
	QDialog::changeEvent(e);
	switch (e->type()) {
	case QEvent::LanguageChange:
		m_ui->retranslateUi(this);
		break;
	default:
		break;
	}
}
